﻿@page "/departments/delete/{DepartmentID}"
@inherits DeleteModel
<h2>Delete</h2>
<div>
    @if (IsBusy)
    {
        <p>Loading...</p>
    }
    else
    {
        <h3>Are you sure you want to delete this?</h3>
        <div>
            <h4>Department</h4>
            <hr />
            <dl class="row">
                <dt class="col-sm-2">Name</dt>
                <dd class="col-sm-10">@Department.Name</dd>
                <dt class="col-sm-2">Budget</dt>
                <dd class="col-sm-10">@($"${Department.Budget}")</dd>
                <dt class="col-sm-2">Start Date</dt>
                <dd class="col-sm-10">@Department.StartDate.ToString("dd MMM yyyy")</dd>
                <dt class="col-sm-2">Administrator</dt>
                <dd class="col-sm-10">@Department.AdministratorFullName</dd>
            </dl>
        </div>
        
        <div>
            <a class="btn btn-default" href="/departments">Cancel</a>
            <button class="btn btn-primary" onclick="@OnDeleteClick">Delete</button>
        </div>
    }
</div>
